#include<bits/stdc++.h>
using namespace std;
#define ll long long
 
int main(){
    int f,m,n;
    cin>>f>>m>>n;
    int cishu=(n-3)/7;
    if((n-3)%7>=4)cishu++;
    cout<<(2*f+m)*cishu<<endl;
 
    return 0;
}